import request from '@/utils/request';
export const getWorkflowList = (data: any) => {
  // 处理数组参数，将数组转换为字符串
  const processedData = { ...data };
  if (processedData.backups && Array.isArray(processedData.backups)) {
    processedData.backups = processedData.backups.join(',');
  }
  return request({
    url: `/workflows/query`,
    method: 'get',
    params: processedData,
  });
};
// 获取发布状态
export const workflowStatus = () => {
  return request({
    url: `/enum/workflowStatus`,
    method: 'get',
  });
};

// 删除编排
export const deleteWorkflow = (data: any) => {
  return request({
    url: `/workflows/delete`,
    method: 'delete',
    data,
  });
};
